<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<?php
        include_once "../inc/docroot.php";
        include_once PATH."inc/class.autores.inc.php";
        $autores = new autores($db);
        if(isset($_GET['campaign']))$campaign_id = $_GET['campaign'];

?>
<body>
<div>
   <div class="autores_header">
<?php
       if( !empty($_POST['name'])) {
            echo "<br /><br />";
            echo $autores->genalias($campaign_id, $_POST['name']);
            ?>
            <script>
            window.opener.location.reload();
            </script>
            <?php
       }
       else {
            echo "<br />";
            echo "<br />";
            echo "<label>Please fill all the fields.</label>";
        }
        echo "<br />";
        echo "<br />";
       
        echo "<label> GENERATE NEW SENDER MAILS </label>";
?>
      </div>
  <form method="post" action="gennewalias.php<?php echo "?campaign=".$campaign_id;?>" name="gennewaliasform" id="gennewaliasfor">
    <div style="font-size:9px;" align="center">
      <br />
      <br />
      <input type="text" name="name" id="name" style="text-align:center"/>
      <label for="name">User Name</label>
      <br />
      <br />
      <br />
      <br />
      <input type="submit" name="gennewaliasinput" id="gennewaliasinput" value="Generate Sender Mails" class="btn btn--blue btn--m" />
    </div>
  </form>
</div>
</body>
